/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author alumno
 */
@Embeddable
public class CancelacionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "CC_COD")
    private int ccCod;
    @Basic(optional = false)
    @Column(name = "IE_COD")
    private int ieCod;

    public CancelacionPK() {
    }

    public CancelacionPK(int ccCod, int ieCod) {
        this.ccCod = ccCod;
        this.ieCod = ieCod;
    }

    public int getCcCod() {
        return ccCod;
    }

    public void setCcCod(int ccCod) {
        this.ccCod = ccCod;
    }

    public int getIeCod() {
        return ieCod;
    }

    public void setIeCod(int ieCod) {
        this.ieCod = ieCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) ccCod;
        hash += (int) ieCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CancelacionPK)) {
            return false;
        }
        CancelacionPK other = (CancelacionPK) object;
        if (this.ccCod != other.ccCod) {
            return false;
        }
        if (this.ieCod != other.ieCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.CancelacionPK[ ccCod=" + ccCod + ", ieCod=" + ieCod + " ]";
    }
    
}
